package com.io.example.demoparent.bo;

import java.util.EventObject;

/**
 * @program: demo-project
 * @ClassName BizEvent
 * @description:
 * @author: 宠儿
 * @create: 2024−09-05 23:26
 * @Version 1.0
 **/
public class BizEvent extends EventObject {


    private static final long serialVersionUID = 1L;

    /**
     *  Topic 主题
     */
    private final String topic;

    /**
     * 业务id
     */
    private final String bizId;

    /**
     * 数据
     */
    private final  Object data;

    /**
     * @param topic 事件topic，用于区分事件类型
     * @param bizId 业务ID，标识这一次的调用
     * @param data  事件传输对象
     */
    public BizEvent( String topic, String bizId, Object data) {
        super(data);
        this.topic = topic;
        this.bizId = bizId;
        this.data = data;
    }

    public String getTopic() {
        return topic;
    }

    public String getBizId() {
        return bizId;
    }

    public Object getData() {
        return data;
    }
}
